import {axiosClient,HttpPromise} from '../../utils/axiosClient';
import { HotTopicResp } from '../bean/HotTopicResp';
import { TopicDetailResp } from '../bean/TopicDetailResp';
import { TopicListResp } from '../bean/TopicListResp';

// 1.获取热门文章api接口
export const getHotTopics = (): HttpPromise<HotTopicResp> => axiosClient.get({url:'/hottopic'});

// 2.获取话题(文章)列表信息接口
export const getTopicList = (page:number): HttpPromise<TopicListResp> => axiosClient.get({url:'/topiclist',params:{page:page}});

// 3.获取话题(文章)详情接口
export const getTopicDetail = (id:number): HttpPromise<TopicDetailResp> => axiosClient.get({url:'/topicdetail',params:{id:id}});